
<script setup>
import { ref } from 'vue';
import Son from './components/Son.vue';
const money = ref(10000)
const car = ref('宝马')

const addMoney = (val) => {
    money.value += val
}
const reduceMoney = (val) => {
    money.value -= val
}
</script>

<template>
    <div>父组件</div>
    <Son :money="money" :car="car" @addMoney="addMoney" @reduceMoney="reduceMoney"></Son>
    <Son :money="money"></Son>
</template>
